
<?php
	header("Content-type:text/html;charset=utf-8");
	
	$name = $_POST["userName"];
	$pwd = $_POST["userPwd"];
	
	$conn = mysql_connect("localhost","root","root");
	
	if($conn){
		mysql_select_db("2005");
	}
	
	$result = mysql_query("select * from stu where name = '$name' AND pwd='$pwd'",$conn);
	
	
	if(mysql_num_rows($result) >0){
		echo "1";
	}else{
		echo "0";
	}
	
	mysql_close($conn);
?>